import { Component, OnInit } from '@angular/core';
import {MemberService} from "../../myService/service.component";

@Component({
  selector: 'history_list',
  templateUrl: './history.component.html',
  styleUrls: ['./history.component.css']
})
export class HistoryComponent implements OnInit{
  list=[];
  constructor(private TitleList:MemberService){}
  ngOnInit(){
    this.TitleList.getsevice();
    this.TitleList.testSubject.subscribe(
      data => {
        console.log('我是订阅到的', data)
        this.list = data;
      }
    )
  }
}
